#ifndef COMMONDEFINE_H
#define COMMONDEFINE_H

#ifdef _WIN32
#define __FILENAME__ (strrchr(__FILE__, '\\') ? (strrchr(__FILE__, '\\') + 1) : __FILE__)
#else
#define __FILENAME__ (strrchr(__FILE__, '/') ? (strrchr(__FILE__, '/') + 1) : __FILE__)
#endif

#define FILE_FUNC_LINE\
    std::string()\
    .append(__FILENAME__).append(":").append(__FUNCTION__).append(":")\
    .append(std::to_string(__LINE__)).append(" ").c_str()

namespace SuperLogQt
{
typedef enum tagLogLevelenum
{
    LEVEL_TRACE = 0,
    LEVEL_DEBUG,
    LEVEL_INFO,
    LEVEL_WARN,
    LEVEL_ERROR,
    LEVEL_CRITICAL,
    LEVEL_OFF,
} LogLevel;

}
#endif // COMMONDEFINE_H
